""""""
from common.base import Base

"""点击立即购买页面"""


class BuyNow_page(Base):
    """制作定位器"""

    buy_now_loc = (
        "css selector", "#ECS_FORMBUY > ul > li.padd > table >tbody > tr > td.td1 > a > img")

    buy_quantity_loc = ("css selector", "# number")  # 购买数量

    def click_buy_now(self):
        """点击立即购买"""
        self.click(self.buy_now_loc)

    def revise_quantity(self, text):
        """修改商品数量"""
        self.send_keys(self.buy_quantity_loc, text)
